﻿using System;
using System.Collections.Generic;
using System.Text;

namespace _4._20作业2
{
    class student
    {
        protected string Name;
        protected int Age;
        protected string Degree;
        public student(string name, int age,string degree)
        {
            this.Name = name;
            this.Age = age;
            this.Degree = degree;
        
        
        }
        
    }
    class Undergraduate : student
    {
        protected string spec;
        public Undergraduate(string name, int age, string degree,string spec) : base(name, age, degree)
        {
            this.spec = spec;
            Console.WriteLine("姓名：{0} 年龄：{1}  学位：{2} 研究方向：{3}",name,age,degree,spec);
        }
    
    }
    class Graduate : student
    {
        protected string drec;
        public Graduate(string name, int age, string degree, string drec) : base(name, age, degree)
        {
            this.drec = drec;
            Console.WriteLine("姓名：{0} 年龄：{1}  学位：{2} 研究方向：{3}", name, age, degree, drec);
        }

    }
}
